# class Money(object):
#     def __init__(self):
#         self.__money=10
    
#     @property
#     def money(self):
#         return self.__money
    
#     @money.setter
#     def money(self,value):
#         if isinstance(value,int):
#             self.__money=value
#         else:
#             print("erro")
# def main():
#     a= Money()
#     a.money="a"
#     print(a.money)
# if __name__ == '__main__':
#     main()
    
class Money(object):
    def __init__(self):
        self.__money=0

    @property
    def money(self):
        return self.__money
    @money.setter
    def money(self,value):
        if isinstance(value,int):
            self.__money=value
        else:
            print("erro: 类型不匹配")

def main():
    m=Money()
    m.money=10
    print(m.money)
if __name__ == '__main__':
    main()
    